// 导入二次封装后的axios
import http from "./http.js"
import http2 from './http2.js' 

// 获取地图数据
const all = () => {
  return http.get('/iot/device/all');
}
// 获取设备统计数据
const statistic = () => {
  return http.get('/iot/device/statistic');
};
// 获取信息栏数据
const list = () => {
  return http.get('/system/notice/list', {
    params: {
      pageNum: 1,
      pageSize: 6
    }
  });
};
// 获取Mqtt统计指标数据
const metrics = () => {
  return http2.get('/v4/metrics');
};

// 获取Mqtt状态数据
const stats = () => {
  return http2.get('/v4/stats');
};

// 获取CPU使用率数据、内存使用率数据、系统盘使用率数据
const server = () => {
  return http.get('/monitor/server');
};

export default {
  all,
  statistic,
  list,
  metrics,
  stats,
  server
}